
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>app1_index.jsp</title>
</head>
<body>
<!--
  <a href="http://localhost:3000/auth?client_id=1&redirect_uri=http://localhost:8080/app2.html&scope=openid profile&response_type=code&state=455356436">登录</a>
 -->
<h1>app2_home</h1><br>
<input type="hidden" id="subId" value="<%=request.getAttribute("sub")%>">
<input type="hidden" id="userInfo" value="<%=request.getAttribute("detail")%>">
您的ID：<h1 style="color: orangered;"><%=request.getAttribute("sub")%></h1>
成功获取您的个人信息：<h1 style="color: orangered;"><%=request.getAttribute("userInfo")%></h1>
</body>
</html>
<script type="text/javascript">
    let sub = document.getElementById("subId").value;
    let storage = window.localStorage;
    localStorage.setItem("sub", sub);
</script>